import React, {useContext} from "react";
import {Button} from 'antd';
import action from "../../store/actions";
import {connect} from "react-redux";
// import {connect} from "./myReactRedux";

const VoteFooter = function VoteFooter(props) {
    console.log(props,'action.vote')
    let {support, oppose} = props
    return <div className="footer">
        <Button type="primary" onClick={
            support
        }>
            支持
        </Button>

        <Button type="primary" danger onClick={
            oppose
        }>
            反对
        </Button>
    </div>;
};
export default connect(null, action.vote)(VoteFooter);
// export default connect(null,dispatch => {
//     return {
//         support(){
//             dispatch(action.vote.support())
//         },
//         oppose(){
//             dispatch(action.vote.oppose())
//         }
//     }
// })(VoteFooter);